﻿<UserControl x:Class="ColorPickerControls.Chips.ColorChip"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
            Width="30" Height="30" MouseDown="UserControl_MouseDown" MouseUp="UserControl_MouseUp" MouseDoubleClick="UserControl_MouseDoubleClick">
    <UserControl.Resources>
        <DrawingBrush Viewport="0.0,0.0,0.5,0.5" TileMode="Tile"    x:Key="CheckerBoard"   >

            <DrawingBrush.Drawing>
                <DrawingGroup>
                    <GeometryDrawing Brush="White">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry Rect="0,0,10,10" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>

                    <GeometryDrawing>
                        <GeometryDrawing.Geometry>
                            <GeometryGroup>
                                <RectangleGeometry Rect="0,0,5,5" />
                                <RectangleGeometry Rect="5,5,5,5" />
                            </GeometryGroup>
                        </GeometryDrawing.Geometry>
                        <GeometryDrawing.Brush>
                            <SolidColorBrush Color="#d7d7d7"/>

                        </GeometryDrawing.Brush>
                    </GeometryDrawing>
                </DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>

    </UserControl.Resources>
    <Grid>
        <Border Margin="2,2,2,2" Background="{StaticResource CheckerBoard}"   VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
            
        </Border>
    <Border  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  BorderBrush="#FFCACACA" BorderThickness="1"  >
            <Border  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  BorderBrush="white" BorderThickness="1"  >
                <Border Name="colorRect" Background="Gray"/>
            </Border>
        </Border>
   </Grid>
</UserControl>
